package
{
	import com.fellong.flash.flar.view.FlarBasicView;
	import com.fellong.flash.flar.detector.FlarDetector;
	
	/// FlarDetector Demo: 5 cube with a light effect and detected square debug draw.
	public class FlarMultiCubeDemo extends FlarBasicView {
						
		public function FlarMultiCubeDemo() {
			super();
			FlarDetector._force_smooth = true;
			FlarDetector._force_delay = 500;

			// initialize FlarObject
			var light:FlarLight = new FlarLight();
			light.detector.loadCode( 'Data/cube16_100_front.pat',16,100 );
			this.scene.addChild( light );
			
			var cube:FlarCube;
			
			cube = new FlarCube(light.light);
			cube.detector.loadCode( 'Data/cube16_100_up.pat',16,100 );
			this.scene.addChild( cube );
			
			cube = new FlarCube(light.light);
			cube.detector.loadCode( 'Data/cube16_100_down.pat',16,100 );
			this.scene.addChild( cube );

			cube = new FlarCube(light.light);
			cube.detector.loadCode( 'Data/cube16_100_right.pat',16,100 );
			this.scene.addChild( cube );

			cube = new FlarCube(light.light);
			cube.detector.loadCode( 'Data/cube16_100_left.pat',16,100 );
			this.scene.addChild( cube );

			cube = new FlarCube(light.light);
			cube.detector.loadCode( 'Data/cube16_100_back.pat',16,100 );
			this.scene.addChild( cube );

			this.scaleX = this.scaleY = 2;					
			startRendering();
		}		

	}
}